<!DOCTYPE html	PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:s="http://sduept.security.el/func"
	template="/template/template_dialog.xhtml">
	<ui:define name="head">

		<link href='/resources/plugins/layer/skin/layer.css' rel='stylesheet' />
		<script>
			function closeAndSave() {
				var index = parent.layer.getFrameIndex(window.name);
				if (parent.dialogReturn) {
					parent.dialogReturn(index);
				}
				parent.layer.close(index);
				window.parent.location.reload();
			}
		</script>
	</ui:define>

	<ui:define name="content">
		<h:form id="editForm">
			<p:toolbar>
				<f:facet name="left">
					<p:commandButton value="保存" icon="ui-icon-disk"
						update=":editForm:msgs "
						actionListener="#{rectificationPlanDetailController.saveUpdate}"
						disabled="#{!rectificationPlanDetailController.status}"
						oncomplete="closeAndSave()" />
				</f:facet>
			</p:toolbar>
			<p:growl id="msgs" showDetail="true" />
			<p:accordionPanel multiple="true" dynamic="true">
				<p:tab title="基本信息" titleStyle="font-weight:bold" closable="true">
					<p:panelGrid header="基本信息" style="margin-top:10px;"
						styleClass="ui-noborder">
						<p:row>
							<p:column>
								<p:outputLabel value="检查计划：" />
							</p:column>
							<p:column colspan="5">
								<h:outputText
									value="#{rectificationPlanDetailController.currentTrack.inspectionPlanName}" />
							</p:column>
						</p:row>
						<p:row>
							<p:column>
								<p:outputLabel value="被检单位：" />
							</p:column>
							<p:column>
								<h:outputText value="#{rectificationPlanDetailController.currentTrack.acceptUnit}" />
							</p:column>
							<p:column>
								<p:outputLabel value="检查变电站：" />
							</p:column>
							<p:column>
								<h:outputText
									value="#{rectificationPlanDetailController.currentTrack.stationName}" />
							</p:column>
						</p:row>
						<p:row>
							<p:column>
								<p:outputLabel value="间隔名称：" />
							</p:column>
							<p:column>
								<h:outputText
									value="#{rectificationPlanDetailController.currentTrack.equipmentName}" />
							</p:column>
							<p:column>
								<p:outputLabel value="风险等级：" />
							</p:column>
							<p:column>
								<h:outputText
									value="#{rectificationPlanDetailController.currentTrack.riskLevel}" />
							</p:column>
						</p:row>
						<p:row>
							<p:column>
								<p:outputLabel value="电压等级：" />
							</p:column>
							<p:column>
								<h:outputText
									value="#{rectificationPlanDetailController.currentTrack.voltage}kV" />
							</p:column>
							<p:column>
								<p:outputLabel value="问题归类：" />
							</p:column>
							<p:column>
								<p:autoComplete
									value="#{rectificationPlanDetailController.currentTrack.questionCategory}"
									completeMethod="#{rectificationPlanDetailController.completeHiddenDangerQuesClass}"
									scrollHeight="400" dropdown="true" />
							</p:column>
						</p:row>
						<p:row>
							<p:column>
								<p:outputLabel value="隐患描述:" />
							</p:column>
							<p:column colspan="3">
								<p:inputTextarea cols="60" autoResize="false"
									readonly="#{!rectificationPlanDetailController.status}"
									value="#{rectificationPlanDetailController.currentTrack.problemDescription}" />
							</p:column>
						</p:row>
					</p:panelGrid>
				</p:tab>
				<p:tab title="整改信息" titleStyle="font-weight:bold" closable="true"
					dynamic="true">
					<p:panelGrid header="整改信息" style="margin-top:10px;"
						styleClass="ui-noborder">
						<p:row>
							<p:column>
								<p:outputLabel value="计划开始时间：" />
							</p:column>
							<p:column>
								<p:calendar size="22"
									readonly="#{!rectificationPlanDetailController.status}"
									value="#{rectificationPlanDetailController.currentTrack.planStartDate}"
									navigator="true" pattern="yyyy-MM-dd HH:mm:ss" showHour="true"
									showMinute="true" showSecond="true" />
							</p:column>
							<p:column>
								<p:outputLabel value="计划完成时间：" />
							</p:column>
							<p:column>
								<p:calendar size="22"
									readonly="#{!rectificationPlanDetailController.status}"
									value="#{rectificationPlanDetailController.currentTrack.planFinishDate}"
									navigator="true" pattern="yyyy-MM-dd HH:mm:ss" showHour="true"
									showMinute="true" showSecond="true" />
							</p:column>
						</p:row>
						<p:row>
							<p:column>
								<p:outputLabel value="实际开始时间：" />
							</p:column>
							<p:column>
								<p:calendar size="22"
									readonly="#{!rectificationPlanDetailController.status}"
									value="#{rectificationPlanDetailController.currentTrack.actualStartDate}"
									navigator="true" pattern="yyyy-MM-dd HH:mm:ss" showHour="true"
									showMinute="true" showSecond="true" />
							</p:column>
							<p:column>
								<p:outputLabel value="实际完成时间：" />
							</p:column>
							<p:column>
								<p:calendar size="22"
									readonly="#{!rectificationPlanDetailController.status}"
									value="#{rectificationPlanDetailController.currentTrack.actualFinishDate}"
									navigator="true" pattern="yyyy-MM-dd HH:mm:ss" showHour="true"
									showMinute="true" showSecond="true" />
							</p:column>
						</p:row>
						<p:row>
							<p:column>
								<p:outputLabel value="是否完成整改：" />
							</p:column>
							<p:column>
								<h:selectOneMenu style="width:160px;height:30px"
									readonly="#{!rectificationPlanDetailController.status}"
									value="#{rectificationPlanDetailController.currentTrack.status}">
									<f:selectItem itemLabel="完成" itemValue="1" />
									<f:selectItem itemLabel="未完成" itemValue="0" />
								</h:selectOneMenu>
							</p:column>
						</p:row>
						<p:row>
							<p:column>
								<p:outputLabel value="整改建议：" />
							</p:column>
							<p:column colspan="3">
								<p:inputTextarea rows="3" cols="60" autoResize="false"
									value="#{rectificationPlanDetailController.currentTrack.recommendation}"
									readonly="true" />
							</p:column>
						</p:row>
						<p:row>
							<p:column>
								<p:outputLabel value="整改计划（方案）：" />
							</p:column>
							<p:column colspan="3">
								<p:inputTextarea rows="3" cols="60" autoResize="false"
									value="#{rectificationPlanDetailController.currentTrack.rectificationPlan}"
									readonly="#{!rectificationPlanDetailController.status}" />
							</p:column>
						</p:row>
						<p:row>
							<p:column>
								<p:outputLabel value="被检单位意见：" />
							</p:column>
							<p:column colspan="3">
								<p:inputTextarea rows="3" cols="60" autoResize="false"
									readonly="#{!rectificationPlanDetailController.status}"
									value="#{rectificationPlanDetailController.currentTrack.feedback}" />
							</p:column>
						</p:row>
					</p:panelGrid>
				</p:tab>
				<p:tab title="人员信息" titleStyle="font-weight:bold">
					<p:panelGrid styleClass="ui-noborder" border="0px" width="100">
						<p:row>
							<p:column>
								<p:outputLabel value="检查专家：" />
							</p:column>
							<p:column>
								<h:outputText
									value="#{rectificationPlanDetailController.currentTrack.inspectionExpertName}" />
							</p:column>
							<p:column>
								<p:outputLabel value="检查专家电话：" />
							</p:column>
							<p:column>
								<h:outputText
									value="#{rectificationPlanDetailController.currentTrack.inspectionExpertNamePhone}" />
							</p:column>

						</p:row>
						<p:row>
							<p:column>
								<p:outputLabel value="负责人员:" />
							</p:column>
							<p:column>
								<h:outputText
									value="#{rectificationPlanDetailController.currentTrack.personInChargeName}" />
							</p:column>
							<p:column>
								<p:outputLabel value="负责人电话:" />
							</p:column>
							<p:column>
								<h:outputText
									value="#{rectificationPlanDetailController.currentTrack.personInChargePhone}" />
							</p:column>
						</p:row>
						<p:row>
							<p:column>
								<p:outputLabel value="整改人员：" />
							</p:column>
							<p:column>
								<p:autoComplete scrollHeight="400" dropdown="true"
									readonly="#{!rectificationPlanDetailController.status}"
									var="p" itemLabel="#{p.name}" itemValue="#{p.id}"
									completeMethod="#{rectificationPlanDetailController.completeRectificationPerson}" >
									<p:ajax event="itemSelect" update="rPhone"
										listener="#{rectificationPlanDetailController.selectedPerson}"/>
								</p:autoComplete>
								
							</p:column>
							<p:column>
								<p:outputLabel value="整改人电话:" />
							</p:column>
							<p:column>
								<p:inputText id="rPhone"
									value="#{rectificationPlanDetailController.currentTrack.rectificationPersonphone}"
									readonly="#{!rectificationPlanDetailController.status}" />
							</p:column>
						</p:row>
					</p:panelGrid>
				</p:tab>
				<p:tab title="评价信息" titleStyle="font-weight:bold">
					<p:panelGrid styleClass="ui-noborder" width="100">
						<p:row>
							<p:column>
								<p:outputLabel value="检查要素及要求：" />
							</p:column>
							<p:column colspan="3">
								<h:outputText rows="3" cols="60"
									value="#{rectificationPlanDetailController.currentTrack.requirmentItemContent}" />
							</p:column>
						</p:row>
						<p:row>
							<p:column>
								<p:outputLabel value="评分标准：" />
							</p:column>
							<p:column colspan="3">
								<h:outputText rows="3" cols="60"
									value="#{rectificationPlanDetailController.currentTrack.inspectionItemContent}" />
							</p:column>
						</p:row>
						<!-- <p:row>
							<p:column>
								<p:outputLabel value="对应分类：" />
							</p:column>
							<p:column>
								<p:autoComplete scrollHeight="400" dropdown="true"
									value="#{rectificationPlanDetailController.currentTrack.classify}"
									completeMethod="#{hiddenDangerTrackController.completeClassify}" />
							</p:column>
							<p:column>
								<p:outputLabel value="扣分情况：" />
							</p:column>
							<p:column>
								<p:inputText value="#{rectificationPlanDetailController.currentTrack.scoreDeduction}" />
							</p:column>
							<p:column>
								<p:outputLabel value="原因归类：" />
							</p:column>
							<p:column>
								<p:autoComplete scrollHeight="400" dropdown="true"
									value="#{rectificationPlanDetailController.currentTrack.hiddenDangerReasonClass}"
									completeMethod="#{hiddenDangerTrackController.completeHiddenDangerReasonClass}" />
							</p:column>
						</p:row> -->
					</p:panelGrid>
				</p:tab>
				<p:tab title="其他" titleStyle="font-weight:bold">
					<p:panelGrid styleClass="ui-noborder" border="0px" width="100">
						<p:row>
							<p:column>
								<p:outputLabel value="备注：" />
							</p:column>
							<p:column>
								<p:inputTextarea cols="60" autoResize="false"
									readonly="#{!rectificationPlanDetailController.status}"
									value="#{rectificationPlanDetailController.currentTrack.remark}" />
							</p:column>
						</p:row>
					</p:panelGrid>
				</p:tab>
			</p:accordionPanel>
		</h:form>
	</ui:define>
</ui:composition>